/**
 * LVL.Component - Superclass for all LVL components.
 */

define(['blacksmith/game'], function() {



/**
 * Constructs an LVL.Component instance.
 * 
 * @param {object} args
 * @constructor
 * @extends GAME.Block
 */
LVL.Component = function(args) {
    
    args = args || {}
    args.name = args.name || 'COMPONENT'
    
    GAME.Block.call(this, args)
    
    this.hp = args.hp || 10
    this.power = args.power || -5
    
}

LVL.Component.prototype = Object.create(GAME.Block.prototype)



/**
 * Returns this components image.
 * 
 * @abstract
 * @returns image data
 */
LVL.Component.prototype.getComponentImage = function() {}



/**
 * Updates component state.
 */
LVL.Component.prototype.update = function() {
    
    GAME.Block.prototype.update.call(this)
    
}



/**
 * Mouse begins hovering over this block.
 */
LVL.Component.prototype.onMouseEnter = function() {
    
    LVL.UI.componentInfo(this)
    
}



/**
 * Mouse ends hovering over this block.
 */
LVL.Component.prototype.onMouseExit = function() {
    
    
    
}



/**
 * Mouse button is down whilst over this block.
 * 
 * @param {event} event
 */
LVL.Component.prototype.onMouseDown = function(event) {
    
    LVL.UI.componentEdit(this)
    
}



})
